package com.daxt.utils.file;

import cn.hutool.poi.excel.ExcelReader;
import cn.hutool.poi.excel.ExcelUtil;
import com.alibaba.fastjson.JSON;
import com.daxt.common.exception.BaseException;
import com.daxt.common.result.ResultCode;
import com.daxt.model.constant.FileExt;
import com.daxt.model.dto.BaseExportParam;
import com.daxt.model.dto.ClassifysTemplate;
import com.daxt.model.service.archives.vo.ArchivesDoc;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.disk.DiskFileItem;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartFile;

import java.io.*;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.activation.MimetypesFileTypeMap;

public class FileBaseUtil {

    /**
     * @description: 文件复制
     *
     * @author: lig
     * @date: 2022/7/26
     */
    public static void copy(String srcPathStr, String desPathStr)
    {
        //获取源文件的名称
        String newFileName = srcPathStr.substring(srcPathStr.lastIndexOf("\\")+1); //目标文件地址
        System.out.println("源文件:"+newFileName);
        File file =new File(desPathStr);
        if(!file.isDirectory()){
            file.mkdirs();
        }
        desPathStr = desPathStr + File.separator + newFileName; //源文件地址
        System.out.println("目标文件地址:"+desPathStr);
        try
        {
            FileInputStream fis = new FileInputStream(srcPathStr);//创建输入流对象
            FileOutputStream fos = new FileOutputStream(desPathStr); //创建输出流对象
            byte datas[] = new byte[1024*8];//创建搬运工具
            int len = 0;//创建长度
            while((len = fis.read(datas))!=-1)//循环读取数据
            {
                fos.write(datas,0,len);
            }

            fos.close();//释放资源
            fis.close();//释放资源
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }

    public static int fileMove(String from, String to) {
        try {
            File dir = new File(from);

            File[] files = dir.listFiles();

            if (files == null) {
                return -1;

            }

            File moveDir = new File(to);

            if (!moveDir.exists()) {
                moveDir.mkdirs();

                System.out.println("已新建一个目标移动文件夹");

            }

            for (int i = 0; i < files.length; i++) {
                System.out.println("files[i].isDirectory()：" + files[i].isDirectory());

                if (files[i].isDirectory()) {
                    fileMove(files[i].getPath(), to + dir.separator + files[i].getName());

                    files[i].delete();

                }

                File moveFile = new File(moveDir.getPath() + dir.separator + files[i].getName());

                if (moveFile.exists()) {
                    moveFile.delete();

                }

                files[i].renameTo(moveFile);

            }

            System.out.println("文件移动成功！");

        } catch (Exception e) {
            e.printStackTrace();
            System.out.println("移动文件出现异常，异常信息为[" + e.getMessage() + "]");

            return -1;

        }

        return 0;

    }


    /**
     * @description: 获取文件名后缀
     * @author: lig
     * @date: 2021-06-21
     */
    public static String getFileExtName(File file) {

        String fileName = file.getName();
        String prefix = fileName.substring(fileName.lastIndexOf(".") + 1);//如果想获得不带点的后缀，变为fileName.lastIndexOf(".")+1
        return prefix;
    }

    /**
     * @description: 获取文件名前部分
     * @author: lig
     * @date: 2021-06-21
     */
    public static String getFileNameFront(String fileName) {
        if (fileName.lastIndexOf(".") < 1) return fileName;
        String prefix = fileName.substring(0, fileName.lastIndexOf("."));
        return prefix;
    }

    /**
     * @description: 获取文件名扩展部分
     * @author: lig
     * @date: 2021-06-21
     */
    public static String getFileNameExt(String fileName) {
        String prefix = fileName.substring(fileName.lastIndexOf(".") + 1);
        return prefix;
    }

    /**
     * @description: 获取路径的文件名
     * @author: lig
     * @date: 2021-06-21
     */
    public static String getPathFileName(String filePath) {
        String prefix = filePath.substring(filePath.lastIndexOf("/") + 1);
        return prefix;
    }

    /**
     * @description: 获取文件目录名，不包含扩展名
     * @author: lig
     * @date: 2021/7/21
     */
    public static String getFileDirName(File file) {
        String name = "";
        if (file.isDirectory()) {
            String path = file.getAbsolutePath();
            name = path.substring(path.lastIndexOf(File.separator) + 1);
            return name;
        }
        name = file.getName();
        return name.substring(0, name.lastIndexOf("."));
    }


    /**
     * @param ext 文件扩展名
     * @description: 比较文件扩展类型，根据类型匹配
     * @author: lig
     * @date: 2021/7/19
     */
    public static boolean isImg(String ext) {
        if (ext.equalsIgnoreCase(FileExt.img_jpg.getDesc())
                || ext.equalsIgnoreCase(FileExt.img_jpeg.getDesc())
                || ext.equalsIgnoreCase(FileExt.img_png.getDesc())
                || ext.equalsIgnoreCase(FileExt.img_tif.getDesc())
                || ext.equalsIgnoreCase(FileExt.img_tiff.getDesc())
                || ext.equalsIgnoreCase(FileExt.img_gif.getDesc())) {
            return true;
        }
        return false;

    }


    /**
     * @param ext 文件扩展名
     * @description: 是word 扩展名比较
     * @author: lig
     * @date: 2021/7/19
     */
    public static boolean isWord(String ext) {
        if (ext.equalsIgnoreCase(FileExt.doc.getDesc())
                || ext.equalsIgnoreCase(FileExt.docx.getDesc())
        ) {
            return true;
        }
        return false;

    }

    /**
     * @param ext 文件扩展名
     * @description: 是excel 扩展名比较
     * @author: lig
     * @date: 2021/7/19
     */
    public static boolean isExcel(String ext) {
        if (ext.equalsIgnoreCase(FileExt.doc.getDesc())
                || ext.equalsIgnoreCase(FileExt.docx.getDesc())
        ) {
            return true;
        }
        return false;

    }

    /**
     * @param ext 文件扩展名
     * @description: 后缀匹配文件类型
     * @author: lig
     * @date: 2021/7/19
     */
    public static boolean isFile(String ext) {
        if (ext.equalsIgnoreCase(FileExt.doc.getDesc())
                || ext.equalsIgnoreCase(FileExt.docx.getDesc())
                || ext.equalsIgnoreCase(FileExt.xls.getDesc())
                || ext.equalsIgnoreCase(FileExt.xlsx.getDesc())
                || ext.equalsIgnoreCase(FileExt.pdf.getDesc())
        ) {
            return true;
        }
        return false;

    }

    /**
     * @param fileName 文件名
     * @param ext      文件扩展名
     * @description: 构造文件全名
     * @author: lig
     * @date: 2021/7/19
     */
    public static String builFileAllName(String fileName, String ext) {
        return fileName + "." + ext;

    }

    /**
     * @description: 获取file type  文件类型  附件类型
     * @author: lig
     * @date: 2021/7/27
     */
    public static String obtainFileType(String ext) {
        String type = "1";
        if (isImg(ext)) {
            type = "2";
        } else if (ext.equalsIgnoreCase("mp4")) {
            type = "3";
        } else if (ext.equalsIgnoreCase("mp3")) {
            type = "4";
        } else if(ext.equalsIgnoreCase("html")){
            type = "5";
        }else if(ext.equalsIgnoreCase("xml")){
            type = "6";
        }
        return type;

    }

    /**
     * @description: 多个反斜杠替换为一个正斜杠
     * @author: lig
     * @date: 2021-07-30
     */
    public static String againstToOpinion(String url) {

//        System.out.println("111:"+url);
//        url = url.replaceAll("\\\\\\\\", "/");
        System.out.println("222:" + url);
        url = url.replaceAll("\\\\", "/");
        System.out.println("333:" + url);

        return url;


    }


//    public static void importFile() {
//        try {
//            InputStream downFile = new FileInputStream("C:\\Users\\Administrator\\Desktop\\档案系统-分类配置模板.xlsx");//
//            Map<String, List<String>> importXLS = PoiUtil.ImportXLS1(downFile, "Y");
//
//
//            Set<ClassifysTemplate> oneList = new HashSet<>();
//            Set<ClassifysTemplate> twoList = new HashSet<>();
//            Set<ClassifysTemplate> threeList = new HashSet<>();
//
//            String currentOne = "";
//            String currentTwo = "";
//
//            for (String key : importXLS.keySet()) {
//                List<String> list = importXLS.get(key);
//
//                Map<String, String> m = new HashMap();
//                for (int li = 2; li < list.size(); li++) {
////                for (String str : list) {
//                    String[] split = list.get(li).split("zzzzz");
//                    for (int i = 0; i < split.length; i++) {
//                    String tree = "0";
//                        if (StringUtils.isNotEmpty(split[i]) && !split[i].equals("------")) {
//                                if(i==0)m = new HashMap<>();
//                                m.put(i + "", split[i]);
//                                if (i + 4 >= split.length) m.remove(i+ "");
//                                for (Map.Entry<String, String> entry : m.entrySet()) {
//                                    tree = tree + "-" + entry.getValue()  ;
//                                }
//
//                                System.out.println("tree= " + tree);
//                                System.out.println("classNum= " + split[i]);
//                                System.out.println("className= " + split[i + 1]);
//                                System.out.println("------------------ ");
//
//                            oneList.add(new ClassifysTemplate(split[i], split[i + 1], split[i + 2], split[i + 3], tree));
//
//
//
//                        }
//                        i = i + 3;
//
//                    }
//
//                }
//                for (Map.Entry<String, String> entry : m.entrySet()) {
//                    System.out.println("key:"+entry.getKey());
//                    System.out.println("value:"+entry.getValue());
//                }
//            }
//
//
//        } catch (IOException | BaseException e) {
//            e.printStackTrace();
//        }
//
//    }


    /**
     * @description: 文件上传到服务器
     * @author: lig
     * @date: 2021/8/27
     */
    public static String uploadFile(String bucketName, String objectName, InputStream input, String dir) throws IOException {
        try {

            FileUtils.copyToFile(input, new File(dir + "/" + bucketName + "/" + objectName));
            return bucketName + "/" + objectName;
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }

    }

    public static String getContentType(String url) {
        //利用nio提供的类判断文件ContentType
        Path path = Paths.get(url);
        String content_type = null;
        try {
            content_type = Files.probeContentType(path);
        } catch (IOException e) {
//            log.error("Read File ContentType Error");
        }
        //若失败则调用另一个方法进行判断
        if (content_type == null) {
            content_type = new MimetypesFileTypeMap().getContentType(new File(url));
        }
        return content_type;
    }


//    /**
//     * @description: 文件上传
//     * @author: lig
//     * @date: 2021/8/27
//     */
//    public static String upload(FileParam fileParam) throws BaseException, IOException {
//        //存储模式
//        String accType = RedisUtil.getSysConfig(SystemConfigType.ACCESSORY_TYPE);
//        if (StringUtils.isEmpty(accType)) {
//            throw new BaseException(ResultCode.RESULT_ERROR.getCode(), "系统配置缺少‘ACCESSORY_TYPE’存储模式");
////                return ResultUtil.data(ResultCode.RESULT_ERROR.getCode(), "系统配置缺少‘ACCESSORY_TYPE’存储类型", null);
//        }
//
////            String objectName = type+"/"+ LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMM")) + "/" + UUID.randomUUID() + substring;
//        String filePath = "";
//        if (accType.equals(AccessoryType.TYPE_1.getKey())) {
//            filePath = uploadFile(fileParam.getBucketName(), fileParam.getFileUrl(), fileParam.getInputStream(), SystemConfig.ossDir);
//
//        } else if (accType.equals(AccessoryType.TYPE_2.getKey())) {
//
//
//            minIoUtil.upload(file, bucketName);
//            PutObjectOptions options = new PutObjectOptions(fileParam.getInputStream().available(), -1);
//
////                options.setContentType("multipart/form-data");
//            options.setContentType(fileParam.getContentType());
//            filePath = MinioUtil.uploadFile(fileParam.getBucketName(), fileParam.getFileUrl(), fileParam.getInputStream(), options);
////				filePath = MinioUtil.uploadFile(bucketName, objectName, inputStream,
////						options);
//        } else {
////				filePath = MinioUtil.uploadFile(bucketName, fileUrl, inputStream,options);
//        }
//
//        return filePath;
//
//
//    }


    /**
     * @description: 解析档案Excel
     * @author: lig
     * @date: 2021/10/12
     */
    public static List<ArchivesDoc> parseArchivesExcel(String fileUrl, List<String> columns) {
        InputStream downFile = null;
        Map<String, List<String>> importXLS = null;
        try {
            downFile = new FileInputStream(fileUrl);
            importXLS = PoiUtil.ImportXLS1(downFile, "Y");
        } catch (FileNotFoundException e) {
            e.printStackTrace();
            throw new BaseException(ResultCode.RESULT_ERROR.getCode(), "附件路径错误：" + fileUrl);
        } catch (IOException e) {
            e.printStackTrace();
            throw new BaseException(ResultCode.RESULT_ERROR.getCode(), "请检查excel文档内容是否存在公式");
        }finally {
            try {
                downFile.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        List<ArchivesDoc> excelList = new ArrayList<>();
        for (String key : importXLS.keySet()) {
            List<String> list = importXLS.get(key);
            for (String str : list) {
                String[] split = str.split("zzzzz");
                Map<String, String> baseMap = new HashMap<String, String>();
//					for(int i=0;i<columns.size();i++) {
                for (int i = 0; i < split.length; i++) {
                    if (i >= columns.size()) break;
                    baseMap.put(columns.get(i), "------".equals(split[i]) ? "" : split[i]);
                }
                ArchivesDoc parseObject = JSON.parseObject(JSON.toJSONString(baseMap), ArchivesDoc.class);
                excelList.add(parseObject);

            }
        }
        return excelList;

    }


//    public static void main(final String[] args) throws IOException, TikaException, SAXException {
//
////        importFile();
//
//
//
//
//
//    }


    /**
     * 获取指定字符串出现的次数
     *
     * @param srcText  源字符串
     * @param findText 要查找的字符串
     * @return
     */
    public static int appearNumber(String srcText, String findText) {
        int count = 0;
        Pattern p = Pattern.compile(findText);
        Matcher m = p.matcher(srcText);
        while (m.find()) {
            count++;
        }
        return count;
    }

    /**
     * 根据导入的类目文件进行解析
     *
     * @param classifysUrl  源字符串
     * @return
     */
    public static List<ClassifysTemplate> parseClassifysTemplate(String classifysUrl) {
        List<ClassifysTemplate> oneList = new ArrayList<>();
        try {
            InputStream downFile = new FileInputStream(classifysUrl);
            Map<String, List<String>> importXLS = null;
//            importXLS = PoiUtil.ImportXLS1(downFile, "Y");
            importXLS = PoiUtil.importXLSX(downFile, "Y");

            for (String key : importXLS.keySet()) {
                List<String> list = importXLS.get(key);
                ClassifysTemplate ct = new ClassifysTemplate();
                ct.setClassTree("0-");
                for (int li = 2; li < list.size(); li++) {
                    String[] split = list.get(li).split("===");
//                    String[] split = list.get(li).split("zzzzz");
                    for (int i = 0; i < split.length; i++) {
                        int levelNum = i / 4;
                        if (null != ct && levelNum < appearNumber(ct.getClassTree(), "-")) {
                            int ai = StringUtils.ordinalIndexOf(ct.getClassTree(), "-", levelNum + 1);

                            ct.setClassTree(ct.getClassTree().substring(0, ai));
                        }

                        String s0 = split[i];//代号
                        if (StringUtils.isEmpty(s0)) {
                            ClassifysTemplate upCt = oneList.get(oneList.size() - 1);
                            String upClassTree = upCt.getClassTree();
                            String[] upTs = upClassTree.split("-");
                            int a = 4;
                            int b = 2;

                            if (i == 0) {//一级
                                s0 = upTs[1];

                            } else if (i == a * 1) {//二级
                                s0 = upTs[b];
                            } else if (i == a * 2) {//三级
                                if(b + 1 >=upTs.length){
                                    s0 = "";
                                }else{
                                    s0 = upTs[b + 1];
                                }
                            } else if (i == a * 3) {//四级
                                s0 = upTs[b + 2];
                            } else if (i == a * 4) {//五级
                                s0 = upTs[b + 3];
                            } else if (i == a * 5) {//六级
                                s0 = upTs[b + 4];
                            }

                        }


                        if (i + 4 <= split.length) {
                            ct.setClassTree(ct.getClassTree() + "-" + s0);
                        }

                        String s1 = split[i + 1];//	内容
                        String s2 = split[i + 2];//类型
                        String s3 = (i + 3 >= split.length)?"":split[i + 3];// 字段标识

                        i = i + 3;
                        if (StringUtils.isEmpty(s1)) continue;
                        ClassifysTemplate cTemplate = new ClassifysTemplate();
                        cTemplate.setClassNum(s0);
                        cTemplate.setClassName(s1);
                        cTemplate.setClassType(s2.equals("字段") && !StringUtils.isEmpty(s3) ? "2" : "1");
                        cTemplate.setDataColumn(s3);
                        cTemplate.setClassTree(ct.getClassTree());
                        oneList.add(cTemplate);
//


                    }

                }
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        return oneList;
    }

    /**
     * @description: 创建文件
     * @author: lig
     * @date: 2021/11/9
     */
    public static File createFile(String filePath) {
        File f = new File(filePath);
        if (!f.exists()) {//文件是否存在
            try {
                f.createNewFile();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return f;

    }

    /**
     * @param append   是否追加
     * @param filePath 文件路径  文件不存在则新建
     * @description: 写入txt文件
     * @author: lig
     * @date: 2021/11/9
     */
    public static boolean writeTxt(String content, String filePath, boolean append) {
        boolean flag = false;
        File f = new File(filePath);
        try {
            if (!f.exists()) {
                f.createNewFile();
            }
            FileWriter fw = new FileWriter(filePath, append);//append表示是否追加
            fw.write(content);
            fw.close();
            flag = true;
        } catch (IOException e) {
            e.printStackTrace();
        }

        return flag;
    }


    /**
     * @description: 创建目录
     *
     * @author: lig
     * @date: 2021/11/9
     */
    public static void mkdir(String dir) {
        File f = new File(dir);
        if (!f.isDirectory()) f.mkdir();
    }


    /**
     * @description:  InputStream -> File
     *
     * @author: lig
     * @date: 2021/12/24
     */
    public static void inputStreamToFile(InputStream inputStream, File file)
            throws IOException {

        try (FileOutputStream outputStream = new FileOutputStream(file)) {

            int read;
            byte[] bytes = new byte[1024];

            while ((read = inputStream.read(bytes)) != -1) {
                outputStream.write(bytes, 0, read);
            }
            outputStream.close();

        }

    }

    /**
     * @description: file转multipartFile
     * @date: 2022/8/19
     */
    public static MultipartFile getMultipartFile(File file){
        FileItem fileItem=null;
        try {
            fileItem = new DiskFileItem(file.getName(), Files.probeContentType(file.toPath()), false, file.getName(), (int) file.length(), file.getParentFile());
            InputStream input = new FileInputStream(file);
            OutputStream os = fileItem.getOutputStream();
            IOUtils.copy(input, os);
            os.close();
            input.close();
        } catch (IOException ex) {
            ex.printStackTrace();
        }
        MultipartFile multipartFile = new CommonsMultipartFile(fileItem);

        return multipartFile;
    }


    /**
     * 获取文件大小以kb为单位
     *
     * @param size
     * @return
     */
    public static String getPrintSize(long size) {
        return null;
    }

    /**
     * @description: 解析路桥档案Excel
     * @author: lig
     * @date: 2021/10/12
     */
    public static List<ArchivesDoc> parseLqArchivesExcel(BaseExportParam exportParam) {
        String fileUrl=exportParam.getUrl();
        ExcelReader reader = ExcelUtil.getReader(fileUrl);
        List<List<Object>> readAll = reader.read();
        List<ArchivesDoc> docList=new ArrayList<>();

        String archivalNum=null;
        for(int i=0;i<readAll.size();i++){
            if(i%18==0 || i%18==2) continue;
            if(i%18==1){
                //档号
                archivalNum=readAll.get(i).get(1).toString().trim();
                continue;
            }
            ArchivesDoc doc=new ArchivesDoc();

            if(StringUtils.isNotEmpty(exportParam.getFondsId())) doc.setFondsId(exportParam.getFondsId());
            if(StringUtils.isNotEmpty(exportParam.getClassId())) doc.setClassId(Long.parseLong(exportParam.getClassId()));
            if(StringUtils.isNotEmpty(exportParam.getTypeId())) doc.setTypeId(Long.parseLong(exportParam.getTypeId()));
            if(StringUtils.isNotEmpty(exportParam.getState())) doc.setState(exportParam.getState());

            doc.setFileType("scattered");
            doc.setDossierId(0L);
            doc.setDocFrom("3");

            doc.setArchivalNum(archivalNum);
            // 2 责任者
            doc.setDutyPeople(readAll.get(i).get(2)==null? null:readAll.get(i).get(2).toString());
            // 3 题名
            doc.setTitle(readAll.get(i).get(3)==null? null:readAll.get(i).get(3).toString());
            // 4 日期
            doc.setStartTime(readAll.get(i).get(4)==null? null:readAll.get(i).get(4).toString());
            // 5 页数
            doc.setPages(readAll.get(i).get(5)==null? null:readAll.get(i).get(5).toString());
            // 6 备注
            doc.setRemark(readAll.get(i).get(6)==null? null:readAll.get(i).get(6).toString());

            docList.add(doc);
        }

        return docList;
    }

    //删除文件-递归删除
    public static void delete(File folder) {
        if(folder.isDirectory()) {
            File[] files = folder.listFiles();
            if(files != null) { // 如果文件夹为空，files可能为null
                for(File file : files) {
                    delete(file); // 递归删除子文件夹和文件
                }
            }
        }
        folder.delete(); // 删除空文件夹或者文件
    }

    //public static void main(String[] args) {

//        File downFile = new File("C:\\Users\\Administrator\\Desktop\\222\\测试档案001.zip");
////
//        ZipUtil.unzip(downFile, new File("D:\\a\\zipPage\\"), Charset.forName("GBK"));


        /*BigDecimal fileLength = new BigDecimal("0");

        File file1 = new File("C:\\Users\\Administrator\\Desktop\\222\\测试档案002\\附件\\参会人员名单002.docx");
        File file2 = new File("C:\\Users\\Administrator\\Desktop\\222\\测试档案002\\附件\\发文处理笺及日志002.pdf");
        File file3 = new File("C:\\Users\\Administrator\\Desktop\\222\\测试档案002\\附件\\会议纪要002.docx");


        BigDecimal b = new BigDecimal(Double.toString(0.0));

        long l = file1.length();
        double i1 = (file1.length() / (1024.0 * 1024.0));//MB
        BigDecimal b1 = new BigDecimal(Double.toString(i1));
        b = b.add(b1.setScale(1,BigDecimal.ROUND_DOWN));
        b1.add(b).doubleValue();


        b.setScale(2,BigDecimal.ROUND_DOWN);
        System.err.println("总大小："+b.doubleValue());*/

//        BigDecimal b2 = new BigDecimal(Double.toString(file2.length()));
//        b = b.add(b2);
//        b1.add(b2).doubleValue();
//        System.err.println("总大小："+b1.doubleValue());



//        long l = file1.length();
//        double i1 = (file1.length() / (1024.0 * 1024.0));//MB
//        BigDecimal b1 = new BigDecimal(Double.toString(i1));
//        fileLength.add(b1).doubleValue();
//
//        double i2 = (file2.length() / (1024.0 * 1024.0));//MB
//        BigDecimal b2 = new BigDecimal(Double.toString(i2));
//        fileLength.add(b2).doubleValue();
//
//        double i3 = (file3.length() / (1024.0 * 1024.0));//MB
//        BigDecimal b3 = new BigDecimal(Double.toString(i3));
//        fileLength.add(b3).doubleValue();
//
//        System.err.println("总大小："+fileLength.doubleValue());


//        List<ClassifysTemplate> oneList = FileBaseUtil.parseClassifysTemplate("D:\\Documents\\WeChat Files\\ligang134\\FileStorage\\File\\2021-10\\副本档案系统-分类配置模板(1).xlsx");
//        List<ClassifysTemplate> oneList = FileBaseUtil.parseClassifysTemplate("F:\\jtlt\\档案系统\\内蒙-分类导入(1).xlsx");
//        List<ClassifysTemplate> oneList = FileBaseUtil.parseClassifysTemplate("C:/Users/Administrator/Desktop/副本档案系统-分类配置模板(1).xlsx");
//        System.out.println(String.format("11122222"));



        //parseDeptTemplate("F:/zjq/档案系统路桥文档/导入部门、人员.xlsx");
    //}

}
